export function getRedirectPath ({role, avatar}) {
  let path = role === "boss" ? "/boss" : "/genius";
  if (!avatar) {
    path += "info";
  }
  return path;
}

export function getChatId (fromId, toId) {
  return [fromId, toId].sort().join("_");
}

export function getLastMsg (arr) {
  return arr[arr.length - 1].content;
}